GENERATE_WATERSHED and GENERATE_RIDGE_LINES

The GENERATE_WATERSHED command allows for the generation of a watershed, including stream flow and optionally watershed areas for each stream segment. The GENERATE_RIDGE_LINES command shares the same parameters, but finds ridge lines rather than stream lines. A ridge line is created wherever flow would accumulate in the inverse of the terrain surface. The following parameters are supported by the command.

  • FILENAME - filename of the layer(s) to process. If an empty value is passed in, all loaded terrain data will be used. This parameter can be listed more than once to specify multiple input files, like FILENAME="FILENAME_1" FILENAME="FILENAME_2".
  • STREAM_THRESHOLD - specifies the number of cells that have to drain to a particular location before that location is considered to be part of the stream/ridge network.
  • MAX_DEPTH - specifies the maximum depression depth (in meters) that will be filled prior to calculating the watershed. This is needed to prepare a terrain surface for flow analysis so that a continuous flow can be found. Note that while using a large MAX_DEPTH value may generate better results, it could also cause the process to take a lot longer.
  • GEN_AREAS - generate watershed area features for each found stream segment outlining the area that drains into that stream. Enabled by default for watersheds and disabled for ridge lines, use GEN_AREAS=NO to disable.
  • SMOOTH_STREAMS - specifies whether or not generated streams/ridge lines should have smoothing applied to improve appearance. This option is enabled by default. Use SMOOTH_STREAMS=NO to disable smoothing.
  • FLOW_TO_POS - specifies the X and Y location (or longitude/latitude) of a position to generate an area with all parts of the terrain surface that flow to (or near) that point in the vector area feature. The format is FLOW_TO_POS="x,y". You can provide multiple FLOW_TO_POS parameters to find the flow to multiple locations. Use FLOW_TO_POS_THRESH to specify how close to the position the flow has to go in order to consider the source point part of that area. Use FLOW_TO_POS_PROJ to specify the projection of the position. If that is not provided it will be assumed to be in the current projection.
  • FLOW_TO_POS_THRESH - specifies how many samples away from the sample containing the specified FLOW_TO_POS that the flow can be and still be considered to go to that point. The default is FLOW_TO_POS_THRESH=1.
  • FLOW_TO_POS_PROJ - special Projection Specification parameter providing the projection of the FLOW_TO_POS.
  • FILLED_DEM_FILENAME - specifies the full path and name of a GMG (Global Mapper Grid) file to save the depression filled DEM to after finding it. The default is to not save the filled DEM to a GMG file.
  • GEN_FLOW_DIR_POINTS - specifies whether or not a separate layer containing a point feature with the flow direction and accumulation at each sample location. Add GEN_FLOW_DIR_POINTS=YES to create the layer. The symbol can be set with the FLOW_DIR_SYMBOL parameter.
  • FLOW_DIR_SYMBOL - specifies the name of the point symbol to use for the flow direction points. The specified symbol will be rotated to show the flow direction. The default is the medium black arrow.
  • SHOW_FLOW_ACCUM - specifies whether or not the flow accumulation grid should be saved as a new layer. Use SHOW_FLOW_ACCUM=YES to enable saving the flow accumulation to a new grid layer.
  • CALC_STRAHLER - specifies whether or not the Strahler stream order attribute should be calculated for the stream lines. Use CALC_STRAHLER=YES to enable. Use only for GENERATE_WATERSHED command.
  • SPATIAL_RES - specifies spacing of grid points used to calculate the watershed. A smaller grid spacing results in higher fidelity, but the calculation process will take longer. Typically you'll want to use the default value which is the minimum spatial resolution of all loaded data. Should be formatted as x_resolution,y_resolution. The units are the units of the current global projection. For example, if UTM was the current global projection and you wanted to use a grid with a 30 meter spacing, the parameter/value pair would look like SPATIAL_RES=30.0,30.0.
  • SPATIAL_RES_METERS - specifies spatial resolution to use in meters. The value in meters will automatically be converted to the current view/export projection units. For example, to do an export at 2.0 meter spacing (or as close as you can get to that in the current units), use SPATIAL_RES_METERS=2.0, or to do an export at 1.0 meters in X by 1.5 meters in Y, use SPATIAL_RES_METERS="1.0,1.5".
  • SAMPLING_METHOD - specifies the sampling method to use when sampling the terrain layers involved in the watershed calculation. The following values are supported:
    • DEFAULT - Use either automatic resampling based on export or layer resampling, depending on setting of global flag about whether to resample on export
    • AUTO - Automatically select a resampling method based on how the export resolution and bounds compare to the original layout for a layer. For example if you export to a lower resolution a box averager of appropriate size may be used automatically
    • LAYER - Use the sampling method set for each layer
    • The list of SAMPLING_METHOD values for the IMPORT command can also be specified to use a particular sampling method for all layers being exported/
  • FILL_GAPS - specifies that small gaps in between and within the data sets being used to generate the watershed will be filled in by interpolating the surrounding data to come up with an elevation for the point in question. This option is on by default, specify FILL_GAPS=NO to turn off.
  • LAYER_DESC - specifies the name to assign to this layer. If no layer description is provided, the default name of "GENERATED WATERSHED" will be used.
  • MIN_STREAM_LEN - specifies the minimum length in meters of a stream segment at the start of a stream network. Any streams shorter than this that have nothing flowing into them will be discarded. The default is to keep all streams regardless of length.
  • KEEP_ZERO_AT_ZERO - specifies whether or not to modify 0 (typically ocean) values to allow flow to continue across expanses of 0 elevation. The default is to enable this so 0 values don't change. If you want to model flow across 0 surfaces, add KEEP_ZERO_AT_ZERO=NO.
  • MIN_ELEV - If specified, ridge lines will only be found where the elevation is greater than or equal to the MIN_ELEV value. For use with GENERATE_RIDGELINES command only.